var mongoose = require('mongoose');


var schema = mongoose.Schema({
	  user:String,//操作人
	  type:{type: Number, default: 0},//0-销售相关 1-进货相关 2-其他
	  price:{ type: Number, default: 0 },
	  time:Date,
	  name:String,
	  items:[{
		  id:String,
		  name: String,
		  price: Number,
		  sl:Number
	  }]
});

var CashFlow=mongoose.model('cashflows', schema)

module.exports = CashFlow;